package com.eight.statistics.controller;

import com.eight.common.vo.Result;
import com.eight.statistics.pojo.Order;
import com.eight.statistics.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: qy8-education
 * @description:
 * @author: 郑友民（1460115388@qq.com）
 * @create: 2023-05-28 19:15
 **/
@RestController
@RequestMapping("stat/order")
@Api(tags = "统计订单接口类")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @PostMapping("queryAllOrderBang")
    @ApiOperation("条件查询获取到年销售额")
    public Result queryAllOrderBang(@RequestBody Order order) {
        List<Order> orders = orderService.queryAllOrderBang(order);
        return Result.success(orders);
    }
}

